import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopAreaController } from '../../../controllers';
const uctoominishopAreaRouter = new Router();
const minishopAreaController = new uctooMinishopAreaController();

uctoominishopAreaRouter.post('/add', requireUser, minishopAreaController.add);
uctoominishopAreaRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_area'), minishopAreaController.edit);
uctoominishopAreaRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_area'), minishopAreaController.delete);

//For getting minishopArea with permission control
uctoominishopAreaRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_area'), minishopAreaController.getSingle);
uctoominishopAreaRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_area'), minishopAreaController.getMany);
uctoominishopAreaRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_area'), minishopAreaController.getMany);

//#endregion AutoCreateCode
export default uctoominishopAreaRouter;
